<!DOCTYPE html>
<html
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui" 
	xmlns:pe="http://primefaces.org/ui/extensions"
	xmlns:hcs="http://hcs.com/facelets">
	<f:view 
		contentType="text/html" 
		locale="#{templateMB.locale}" >
		<h:head>
			<title>#{i18n.progressus}</title>
			<h:outputStylesheet 
				library="css" 
				name="template.standard.css"/>
			<h:outputStylesheet
				library="css"
				name="template.standard.loading.css"/>
			<h:outputStylesheet
				library="css"
				name="loading.css"/>
			<link 
		    	rel="shortcut icon" 
		    	href="resources/images/shortcut.icon.ico"/>
		    <link 
		    	rel="icon" 
		    	type="image/gif" 
		    	href="resources/images/shortcut.icon.gif"/>
		    <script 
		    	type="text/JavaScript">
				function reloadPage(timeoutPeriod) {
					setTimeout("location.reload(true);", timeoutPeriod);
				}
			</script>
			<style
				type="text/css">
				div#bodyDiv {
					width: 100%;
					padding-bottom: 32px;
				}
				div#footerDiv {
					position: fixed; 
				    width: 100%;
				    height: 32px;
				    padding: 0px; 
				    bottom: 0px;
				}
				.header-toolbar {
					height:60px;
				}
				.header-toolbar-group {
					width: 70%;
					height: 100%;
					text-align:right;
				}
				div.header-right-top-div {
					float: right;
					width: 100%;
    				height:50%;
					text-align:right;
				}
				div.header-right-bottom-div {
					float: right;
					width: 100%;
    				height:50%;
					text-align:right;
				}
				div.header-right-bottom-left-div {
					float: left;
					width: calc(100% - 35px);
					height:100%;
					text-align:right;
					font-size: 20px !important;
				}
				div.header-right-bottom-right-div {
					float: right;
					width: 35px;
					height:100%;
				}
			</style>
		</h:head>
		<h:body 
			onload="reloadPage(630000);">
			<div
				id="containerDiv">
				<div
					id="headerDiv">
					<h:form
						id="headerForm"
						prependId="false">
						<p:toolbar
							styleClass="header-toolbar">
							<p:toolbarGroup 
								align="left">
								<p:commandLink 
									action="#{templateMB.getIndexPageLink()}">
									<p:graphicImage
										url="#{resource['images:progressus.png']}"
										height="55" />
								</p:commandLink>
							</p:toolbarGroup>
							<p:toolbarGroup 
								align="right"
								styleClass="header-toolbar-group">
								<div
									class="header-right-top-div">
									<p:commandLink 
										value="#{templateMB.loggedInUser.login}"/>
									<p:separator/>
									<p:commandLink 
										value="#{i18n.exit}" 
										action="#{templateMB.logout}"/>
									<p:separator/>
									<h:outputText 
										id="todayOutputText" 
										value="#{templateMB.today}"/>
								</div>
								<div
									class="header-right-bottom-div">
									<div
										class="header-right-bottom-left-div">
										<ui:insert 
											name="title">
											#{i18n.index}
										</ui:insert>
									</div>
									<div
										class="header-right-bottom-right-div">
										<p:ajaxStatus>
											<f:facet
												name="start">
												<div class="bubblingG">
													<span id="bubblingG_1"/>
													<span id="bubblingG_2"/>
													<span id="bubblingG_3"/>
												</div>
											</f:facet>  
										</p:ajaxStatus>
									</div>
								</div>
							</p:toolbarGroup>
						</p:toolbar>
						<p:menubar
							id="menubar" 
							model="#{templateMB.defaultMenuModel}" 
							autoDisplay="false"/>
						<p:growl 
							life="5000" 
							showDetail="true"/>
					</h:form>
			    </div>
		    	<div
					id="bodyDiv">
					<ui:insert
		          		name="body"/>
			    </div>
		        <div 
		        	id="footerDiv"> 
			    	<p:breadCrumb>
						<p:menuitem value="#{i18n.index}" url="/index.xhtml" />
						<p:menuitem value="#{i18n.crud}" url="/index.xhtml" />
						<p:menuitem value="#{i18n.user}" url="/crud/user.xhtml" />
					</p:breadCrumb>
			    </div>
			</div>
		</h:body>
	</f:view>
</html>